[ElementTiming] Add element attribute This CL adds the |element| attribute which usually points to the element associated to the PerformanceElementTiming entry. An exception is when the element is disconnected, in which case the attribute getter should return null. Bug: 879270 Change-Id: I771758fd4d87724329ce94c06938575cc5d3611b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1588742 Reviewed-by: Chris Harrelson <chrishtr@chromium.org> Commit-Queue: Nicolás Peña Moreno <npm@chromium.org> Cr-Commit-Position: refs/heads/master@{#655658} 
diff --git a/element-timing/image-carousel.html b/element-timing/image-carousel.html index 9f0ef79..404eca3 100644 --- a/element-timing/image-carousel.html +++ b/element-timing/image-carousel.html 
@@ -37,13 +37,15 @@  const observer = new PerformanceObserver(list => {  list.getEntries().forEach(entry => {  if (entry_count % 2 == 0) { - checkElement(entry, pathname0, 'image0', 'image0', beforeRenderTimes[entry_count]); + checkElement(entry, pathname0, 'image0', 'image0', beforeRenderTimes[entry_count], + document.getElementById('image0'));  checkRect(entry, [0, 200, 0, 200]);  checkNaturalSize(entry, 200, 200);  entry_count_per_element[0]++;  }  else { - checkElement(entry, pathname1, 'image1', 'image1', beforeRenderTimes[entry_count]); + checkElement(entry, pathname1, 'image1', 'image1', beforeRenderTimes[entry_count], + document.getElementById('image1'));  checkRect(entry, [0, 100, 0, 100]);  checkNaturalSize(entry, 100, 100);  entry_count_per_element[1]++;